<!--# layout("/common/layout.html",{"jsBase":"/js/cms/highlevelTalents/"}){ -->

<form class="layui-form " id="addForm">
    <!--# include("/cms/common/basic.html",{"basic":essentialInformation}){} -->
    <fieldset class="layui-elem-field">
        <legend>高层次人才补贴信息</legend>
        <div class="layui-row">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">申报对象类别<span style="color: red">*</span></label>
                    <div class="layui-input-inline">
                        <layui:simpleDictSelect style='layui-input-inline' type="declarationObject"
                                                id="declarationObject" name="declarationObject"
                                                 layVerify="required" lay-filter="declarationObject"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">申报补贴类别<span style="color: red">*</span></label>
                    <div class="layui-input-inline" id="addsub">
                        <select  name="subsidyCategory" lay-verify="required" disabled="disabled ">
                            <option value="">--请先选择申报对象类别--</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">补贴金额<span style="color: red">*</span></label>
                    <div class="layui-input-inline">
                        <input type="text" id="subsidyAmount" name="subsidyAmount" lay-verify="required" readonly class="layui-input input-readonly">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">证书编号<span style="color: red">*</span></label>
                    <div class="layui-input-inline">
                        <input type="text" id="certificateNumber" name="certificateNumber" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">证书获取时间<span style="color: red">*</span></label>
                    <div class="layui-input-inline">
                        <input type="text" id="gettime" name="gettime" lay-verify="required" class="layui-input input-date" >
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">特殊情况说明(最多100汉字)</label>
                    <div class="layui-input-inline">
                        <textarea id="specialInstructions" name="specialInstructions"   class="layui-textarea" style="width: 740px" maxlength="200"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </fieldset>
    <fieldset class="layui-elem-field">
        <legend>材料信息</legend>
        <span style="color: red;margin-left: 30px;font-size: 18px">支持文件格式为：pdf,jpg,png,gif，单个文件大小不超过20M。带*号标识的对应资料必须上传，其它资料不作要求。上传文件内容请确保真实清晰、有效，不能有旋转。上传后请查看预览，正确无误后再申报提交。</span>
        <div class="layui-row">
            <label class="layui-form-label file-upload">身份证件<span style="color: red">*</span></label>
            <layui:attachment name="Idfile" batchFileUUID="${uuid()}" isNew="true" lay-verify="required" bizType="User"/>
        </div>
        <div class="layui-row">
             <label class="layui-form-label file-upload">银行卡材料信息<span style="color: red">*</span></label>
            <layui:attachment name="banknumber" batchFileUUID="${uuid()}" isNew="true" lay-verify="required" bizType="User"/>
        </div>
        <div class="layui-row">
             <label class="layui-form-label file-upload">工作合同<span style="color: red">*</span></label>
            <layui:attachment name="workContract" batchFileUUID="${uuid()}" isNew="true" lay-verify="required" bizType="User"/>
         </div>
        <div class="layui-row">
              <label class="layui-form-label file-upload">高层次人才资质证明材料<span style="color: red">*</span></label>
            <layui:attachment name="certificateQualification" batchFileUUID="${uuid()}" isNew="true" lay-verify="required" bizType="User"/>
        </div>
    </fieldset>
    <layui:personnelsubmitButtons id="addButton" />
</form>
<!--#} -->
<script>
layui.use(['add'], function(){
    var highlevelTalentsAdd = layui.add;
    highlevelTalentsAdd.init();

    var form = layui.form;
    form.on('select(declarationObject)', function (data) {
        var value = data.value;
        if(value==1 || value==11){
            $("#subsidyAmount").val(200000);
        }else if(value==9){
            $("#subsidyAmount").val(400000);
        }else if(value==10){
            $("#subsidyAmount").val(300000);
        }else if(value==13){
            $("#subsidyAmount").val(200000);
        }else if(value==14){
            $("#subsidyAmount").val(100000);
        }else {
            $("#subsidyAmount").val(100000);
        }
        if(document.getElementById("declarationObject").value==""){
            $("#addsub").html(" <select name=\"subsidyCategory\"  disabled=\"disabled\" layVerify=\"required\">\n" +
                "                            <option value=\"\">--请先选择申报对象类别--</option>\n" +
                "                        </select>")
            form.render();
        }else {
            $("#addsub").html("<select name='subsidyCategory' lay-verify='required'>" +
                "                <option value=''>请选择--</option>" +
                "                <option value='1'>第一年次补贴</option>" +
                "                <option value='2'>第二年次补贴</option>" +
                "                <option value='3'>第三年次补贴</option>" +
                "                <option value='4'>第四年次补贴</option>" +
                "                <option value='5'>第五年次补贴</option>" +
                "                </select>")
            form.render();
        }
    });
});
</script>
